package modelLayer;



public class DiscountType
{
    private int discount;
    private Customer customer;
    private static DiscountType instance=null;
    
     public static DiscountType getInstance(){
        if(instance == null){
            instance = new DiscountType();
        }
        return instance;
    }

    public DiscountType(){
        discount = 0;
    }
    
    public int getDiscountType(Customer customer){
        if(customer.getType().equals("gold")){
            return discount=10;
        }
        if(customer.getType().equals("silver")){
            return discount=6;
        }
        if(customer.getType().equals("bronze")){
            return discount=3;
        }
        return discount=0;
    }
}
